#include "my_string.h"
#include <stdio.h>

int main() {
  const char *str_len_test = "hello world";
  my_size_t len = my_strlen(str_len_test);
  printf("测试 my_strlen\n");
  printf("%lu\n", len);

  char dest1[20] = {0};
  const char *src1 = "test";
  my_strncpy(dest1, src1, 6);
  printf("测试 my_strncpy\n");
  printf("%s\n", dest1);

  char dest2[20] = "hello ";
  const char *src2 = "world!";
  my_strncat(dest2, src2, 5);
  printf("测试 my_strncat\n");
  printf("%s\n", dest2);

  const char *str3 = "abc";
  const char *str4 = "abd";
  int cmp_result = my_strcmp(str3, str4);
  printf("测试 my_strcmp:\n");
  printf("%d\n", cmp_result);

  return 0;
}
